// ALIBEGPS.h file 
// connect GPS RAW to ground
// connect GPS SIO to pin Mega 11.  Mega 11 is Rx - DATA going to Mega from GPS.
// GPS Rx pin (in other words, Mega Tx pin) is unused.
//
#ifndef ALIBEGPS_h
	#define ALIBEGPS_h
	
	#include <Arduino.h>
	#include <SoftwareSerial.h>
	#include <TinyGPS++.h>                 	// Special version for 1.0

	#define ALIBE_GPS_DATA_PIN 		11
	#define ALIBE_GPS_UNUSED_PIN 	11 		// leave it as pin 11.
	#define ALIBE_GPS_TIMEZONE_DIFF -6 		// US Central is UTC-6hrs
	
	class ALIBEGPS {
		public:
			ALIBEGPS();
			void begin();
			bool getGPSData();
			double gpsLat;
			double gpsLng;
			char gpsDate[11];
			char gpsTime[9];
			double gpsSpeed;
			double gpsCourseDeg;
			char* gpsHeading;
			double gpsAlt;
			int gpsSatellites;
			
		private:
			void _initVars();
			bool _feedGPS();
			void _gpsDumpToVars();
	};
#endif